<?php

include("db_connect.php");
$search = mysql_real_escape_string($_REQUEST['term']);
$sql = "SELECT name, brand , model FROM tblswaping where name LIKE '".$search."%' ORDER BY id ASC limit 10";
$result = mysql_query($sql) or die(mysql_error());
if($result &&  mysql_num_rows($result)){

	while( $row = mysql_fetch_array($result, MYSQL_ASSOC) )
	{
		
		$row_set[] = $row['name'];
	}
	echo json_encode($row_set);
}



?>